<%! 
    String erroreLogin;
%>

<%
    erroreLogin = (String) (request.getAttribute("erroreLogin"));
%>

<h2>Login</h2>
<p>Ti sei registrato con...?</p>
<span class="siteIcon">
    <a href="Controller?action=loginOpenId&social=google">
        <img src="img/google.png" alt="google"/>
        Google
    </a>
</span>
<span class="siteIcon">
    <a href="Controller?action=loginOpenId&social=yahoo">
        <img src="img/yahoo.png" alt="yahoo"/>
        Yahoo!
    </a>
</span>
<span class="siteIcon">
    <a href="Controller?action=loginFb">
        <img src="img/facebook.png" alt="facebook"/>
        Facebook
    </a>
</span>
<p>Oppure direttamente sul nostro sito?</p>
<div id="loginContainer">
    <div>
        <img src="img/shippingshare.png" alt="Shipping share"/>
        <div id="loginForm">                
            <table>
                <tr><td><label>e-mail:</label></td><td><input type="text" name="mail" onKeyPress="if(event.keyCode==13) ajaxLogin(document.getElementById('mail').value, document.getElementById('password').value)" id="mail"/></td></tr>
                <tr><td><label>password:</label></td><td><input type="password" name="password" onKeyPress="if(event.keyCode==13) ajaxLogin(document.getElementById('mail').value, document.getElementById('password').value)" id="password"/></td></tr>
                <tr><td colspan="2"><input type="submit" value="login" class="myButton" onclick="ajaxLogin(document.getElementById('mail').value, document.getElementById('password').value)"/></td></tr>             
            </table>
            <br/>
            <a href="javascript:void(0)" onclick="mostraDimenticataPasswordPopup();">Ho dimenticato la password</a>
        </div>
    </div>
    <div id="mostraErroreLogin">            
        <%  if (erroreLogin != null && erroreLogin.equals("true")) { %>
            <p>L'e-mail o la password inserite sono errate. Riprova!</p>
        <%  } %>
    </div>
</div>
<p>Non ti sei ancora registrato? <a href="javascript:void(0)" onclick="mostraRegistrazionePopup();">Registrati ora!</a></p>

